package com.gopay.common.domain.bis;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

import com.gopay.common.cipher.utils.SensitiveInfoUtils;
import com.gopay.common.domain.BaseEntity;

/**
 * 银行交互服务-银企直连订单信息扩展表
 * 
 * @BisBankBcdlOrder.java
 * @author yaobo
 * @2013-11-6 上午09:12:20 www.gopay.com.cn Inc.All rights reserved.
 */
@Entity
@Table(name = "BIS_BANK_BCDL_ORDER")
public class BisBankBcdlOrder extends BaseEntity {

    /**
     * 
     */
    private static final long serialVersionUID = -6288408866048281910L;

    /**
     * 银行订单号
     */
    private String gopayOutOrderId;

    /**
     * 收款人央行银行代码
     */
    private String recvPbocBankCode;

    /**
     * 收款人银行名称
     */
    private String recvBankName;

    /**
     * 收款人开户银行支行全名
     */
    private String recvBankBranchName;

    /**
     * 收款人银行账户开户名
     */
    private String recvBankAcctName;

    /**
     * 收款人银行账号
     */
    private String recvBankAcctNum;

    /**
     * 收款人银行省份代码
     */
    private String recvBankProvinceCode;

    /**
     * 收款人银行省份
     */
    private String recvBankProvinceName;

    /**
     * 收款人银行城市代码
     */
    private String recvBankCityCode;

    /**
     * 收款人银行城市
     */
    private String recvBankCityName;

    /**
     * 收款方银行央行联行号
     */
    private String recvBankPbocNum;

    /**
     * 对公对私标识
     * 
     * 1：对公 2：对私
     */
    private int bcFlag;

    /**
     * 是否跨行 1 - 是 0 - 否
     */
    private int crossBank;

    /**
     * 是否加急 1 - 是 0 - 否
     */
    private int urgent;

    /**
     * 乐观锁版本号
     */
    private int version;

    /**
     * 创建时间
     */
    private Date created;

    /**
     * 记录最后修改时间
     */
    private Date lastUpdTs;

    /**
     * 最后修改交易码
     */
    private String lastUpdTranCode;

    /**
     * 备注3
     */
    private String remark2;

    /**
     * 备注1
     */
    private String remark3;

    /**
     * 银企批量包号
     */
    private String packetNo;
    
    /**
     * 是否重发 1 - 是 0 - 否
     */
    private int reonlinepay;
    
    /**
     * 收款账户类型
     */
    private String acctType;
    
    
    @Id
    @Column(name = "GOPAY_OUT_ORDER_ID")
    public String getGopayOutOrderId() {
		return gopayOutOrderId;
	}

	public void setGopayOutOrderId(String gopayOutOrderId) {
		this.gopayOutOrderId = gopayOutOrderId;
	}

	@Column(name = "RECV_PBOC_BANK_CODE")
    public String getRecvPbocBankCode() {
		return recvPbocBankCode;
	}

	public void setRecvPbocBankCode(String recvPbocBankCode) {
		this.recvPbocBankCode = recvPbocBankCode;
	}

	@Column(name = "RECV_BANK_NAME")
    public String getRecvBankName() {
		return recvBankName;
	}

	public void setRecvBankName(String recvBankName) {
		this.recvBankName = recvBankName;
	}

	@Column(name = "RECV_BANK_BRANCH_NAME")
    public String getRecvBankBranchName() {
		return recvBankBranchName;
	}

	public void setRecvBankBranchName(String recvBankBranchName) {
		this.recvBankBranchName = recvBankBranchName;
	}

	@Column(name = "RECV_BANK_ACCT_NAME")
    public String getRecvBankAcctName() {
		/**
    	 * modify by zyt，2017-2-22在程序中获取的时候进行解密操作，如果是hibernate自己调用（save等），则返回原值；
    	 */
		this.recvBankAcctName = SensitiveInfoUtils.autoReencrypt(this.recvBankAcctName);
    	return SensitiveInfoUtils.smartDecryptWithCheck(this.recvBankAcctName);
	}

	public void setRecvBankAcctName(String recvBankAcctName) {
		/**
    	 * modified by zyt，2017-2-22 判断传入字符串是否经过加密，如果是，则设置为原文，否则设置为加密后的值
    	 */
    	this.recvBankAcctName = SensitiveInfoUtils.smartEncryptWithCheck(recvBankAcctName);
	}

	@Column(name = "RECV_BANK_ACCT_NUM")
    public String getRecvBankAcctNum() {
		/**
    	 * modify by zyt，2017-2-22在程序中获取的时候进行解密操作，如果是hibernate自己调用（save等），则返回原值；
    	 */
		this.recvBankAcctNum = SensitiveInfoUtils.autoReencrypt(this.recvBankAcctNum);
    	return SensitiveInfoUtils.smartDecryptWithCheck(this.recvBankAcctNum);
	}

	public void setRecvBankAcctNum(String recvBankAcctNum) {
		/**
    	 * modified by zyt，2017-2-22 判断传入字符串是否经过加密，如果是，则设置为原文，否则设置为加密后的值
    	 */
    	this.recvBankAcctNum = SensitiveInfoUtils.smartEncryptWithCheck(recvBankAcctNum);
	}

	@Column(name = "RECV_BANK_PROVINCE_CODE")
    public String getRecvBankProvinceCode() {
		return recvBankProvinceCode;
	}

	public void setRecvBankProvinceCode(String recvBankProvinceCode) {
		this.recvBankProvinceCode = recvBankProvinceCode;
	}

	@Column(name = "RECV_BANK_PROVINCE_NAME")
    public String getRecvBankProvinceName() {
		return recvBankProvinceName;
	}

	public void setRecvBankProvinceName(String recvBankProvinceName) {
		this.recvBankProvinceName = recvBankProvinceName;
	}

	@Column(name = "RECV_BANK_CITY_CODE")
    public String getRecvBankCityCode() {
		return recvBankCityCode;
	}

	public void setRecvBankCityCode(String recvBankCityCode) {
		this.recvBankCityCode = recvBankCityCode;
	}

	@Column(name = "RECV_BANK_CITY_NAME")
    public String getRecvBankCityName() {
		return recvBankCityName;
	}

	public void setRecvBankCityName(String recvBankCityName) {
		this.recvBankCityName = recvBankCityName;
	}

	@Column(name = "RECV_BANK_PBOC_NUM")
    public String getRecvBankPbocNum() {
		return recvBankPbocNum;
	}

	public void setRecvBankPbocNum(String recvBankPbocNum) {
		this.recvBankPbocNum = recvBankPbocNum;
	}

	

	@Column(name = "BC_FLAG", nullable = false, precision = 1, scale = 0)
    public int getBcFlag() {
		return bcFlag;
	}

	public void setBcFlag(int bcFlag) {
		this.bcFlag = bcFlag;
	}

	@Column(name = "IS_CROSSBANK", nullable = false, precision = 1, scale = 0)
    public int getCrossBank() {
		return crossBank;
	}

	public void setCrossBank(int crossBank) {
		this.crossBank = crossBank;
	}

	@Column(name = "IS_URGENT", nullable = false, precision = 1, scale = 0)
    public int getUrgent() {
		return urgent;
	}

	public void setUrgent(int urgent) {
		this.urgent = urgent;
	}

	@Column(name = "VERSION")
    @Version
    public int getVersion() {
		return version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	@Column(name = "CREATED_TS")
    public Date getCreated() {
		return created;
	}

	public void setCreated(Date created) {
		this.created = created;
	}

	

	@Column(name = "LAST_UPD_TS")
    public Date getLastUpdTs() {
		return lastUpdTs;
	}

	public void setLastUpdTs(Date lastUpdTs) {
		this.lastUpdTs = lastUpdTs;
	}

	@Column(name = "LAST_UPD_TRANCODE")
    public String getLastUpdTranCode() {
		return lastUpdTranCode;
	}

	public void setLastUpdTranCode(String lastUpdTranCode) {
		this.lastUpdTranCode = lastUpdTranCode;
	}

	@Column(name = "REMARK2")
    public String getRemark2() {
		return remark2;
	}

	public void setRemark2(String remark2) {
		this.remark2 = remark2;
	}

	@Column(name = "REMARK3")
    public String getRemark3() {
		return remark3;
	}

	public void setRemark3(String remark3) {
		this.remark3 = remark3;
	}


	@Column(name = "PACKET_NO")
    public String getPacketNo() {
        return packetNo;
    }

    public void setPacketNo(String packetNo) {
        this.packetNo = packetNo;
    }


	@Column(name = "IS_REONLINEPAY", nullable = false, precision = 1, scale = 0)
	public int getReonlinepay() {
		return reonlinepay;
	}
	
	
	@Column(name="ACCT_TYPE")
	public String getAcctType() {
		return acctType;
	}

	public void setAcctType(String acctType) {
		this.acctType = acctType;
	}

	public void setReonlinepay(int reonlinepay) {
		this.reonlinepay = reonlinepay;
	}
}
